import { createRouter, createWebHistory } from 'vue-router'
const routes = [
  { 
    path:'/Login',
    name: 'Login',
    // 管理员登录
    component: () => import('../views/Login.vue')
  },
  {
    path: '/Admin',
    name: 'Admin',
    component: () => import('../views/Admin.vue'),
    children:[
      {
        path: '',
        component: () => import('../components/admin/UserAdmin.vue')
      },
      {
        path: '/AttendanceAdmin',
        component: () => import('../components/admin/AttendanceAdmin.vue')
      },
      {
        path: '/CoordinateAdmin',
        component: () => import('../components/admin/CoordinateAdmin.vue')
      },
      {
        path: '/psersonInfo',
        component: () => import('../components/admin/PersonalInformation.vue')
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
